import baseModel from './baseModel'

class loginModel extends baseModel {

    constructor(options) {
        super(options);
    }

    checkInfo(content,type) {
    	let url = `/api/user/check/${content}/${type}`;
        return this.$get(url);
    }

    login(data) {
    	let url = `/api/user/login`
    	return this.$post(url,data)
    }

    logout() {
    	let token = sessionStorage.getItem('token');
    	console.log(token);
    	let url = `/api/user/logout/{token}`
    	return this.$get(url)
    }

    calErfei(params) {
        let url = `/api/ERFEI/cal`;
        return this.$post(url, params, {headers:{'Content-Type': 'application/json'}});
    }
}

export default loginModel;